package com.yoona.system.service;

import com.yoona.common.response.BaseResponse;
import com.yoona.system.dto.SysUserLoginOrRegisterDto;
import com.yoona.system.entity.SysUser;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author yoonada
 * @since 2020-11-03
 */
public interface ISysUserService extends IService<SysUser> {

    /**
     * 获取用户微信的appId
     * @param code
     * @return
     * @throws Exception
     */
    BaseResponse<Object> getOpenId(String code) throws Exception;


    /**
     * 微信登录
     * @param code
     * @return
     * @throws Exception
     */
    BaseResponse<Object> wxLogin(String code) throws Exception;

    /**
     * 登录/注册
     * @param sysUserLoginOrRegisterDto
     * @return
     */
    BaseResponse<Object> loginOrRegister(SysUserLoginOrRegisterDto sysUserLoginOrRegisterDto);

    /**
     * 获取用户信息
     * @return
     */
    BaseResponse<Object> getUserInfo();

}
